package com.ruoyi.recycle.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.recycle.domain.IntegralOrderCommodity;
import com.ruoyi.recycle.mapper.IntegralOrderCommodityMapper;
import com.ruoyi.recycle.service.IIntegralOrderCommodityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 积分订单商品中间Service业务层处理
 *
 * @author ruoyi
 * @date 2022-05-22
 */
@Service
public class IntegralOrderCommodityServiceImpl extends ServiceImpl<IntegralOrderCommodityMapper, IntegralOrderCommodity> implements IIntegralOrderCommodityService {
    @Autowired
    private IntegralOrderCommodityMapper integralOrderCommodityMapper;

    /**
     * 查询积分订单商品中间
     *
     * @param id 积分订单商品中间主键
     * @return 积分订单商品中间
     */
    @Override
    public IntegralOrderCommodity selectIntegralOrderCommodityById(Long id) {
        return integralOrderCommodityMapper.selectIntegralOrderCommodityById(id);
    }

    /**
     * 查询积分订单商品中间列表
     *
     * @param integralOrderCommodity 积分订单商品中间
     * @return 积分订单商品中间
     */
    @Override
    public List<IntegralOrderCommodity> selectIntegralOrderCommodityList(IntegralOrderCommodity integralOrderCommodity) {
        return integralOrderCommodityMapper.selectIntegralOrderCommodityList(integralOrderCommodity);
    }

    /**
     * 新增积分订单商品中间
     *
     * @param integralOrderCommodity 积分订单商品中间
     * @return 结果
     */
    @Override
    public int insertIntegralOrderCommodity(IntegralOrderCommodity integralOrderCommodity) {
        return integralOrderCommodityMapper.insertIntegralOrderCommodity(integralOrderCommodity);
    }

    /**
     * 修改积分订单商品中间
     *
     * @param integralOrderCommodity 积分订单商品中间
     * @return 结果
     */
    @Override
    public int updateIntegralOrderCommodity(IntegralOrderCommodity integralOrderCommodity) {
        return integralOrderCommodityMapper.updateIntegralOrderCommodity(integralOrderCommodity);
    }

    /**
     * 批量删除积分订单商品中间
     *
     * @param ids 需要删除的积分订单商品中间主键
     * @return 结果
     */
    @Override
    public int deleteIntegralOrderCommodityByIds(Long[] ids) {
        return integralOrderCommodityMapper.deleteIntegralOrderCommodityByIds(ids);
    }

    /**
     * 删除积分订单商品中间信息
     *
     * @param id 积分订单商品中间主键
     * @return 结果
     */
    @Override
    public int deleteIntegralOrderCommodityById(Long id) {
        return integralOrderCommodityMapper.deleteIntegralOrderCommodityById(id);
    }
}
